/*
 * Copyright (c) 2012 Universidad Antonio de Nebrija.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Apache License v2.0
 * which accompanies this distribution, and is available at
 * http://www.apache.org/licenses/LICENSE-2.0.html
 * 
 * Contributors:
 *    Universidad Antonio de Nebrija - initial API, implementation and documentation
 */
package com.nebrija.riif.model;

import java.util.Set;

/**
 * Base interface for all the RIIF model classes
 * @author asanchep
 *
 */
public interface RIIFElement {
	/**
	 * Returns the name of the element
	 * @return
	 */
	public String getName();
	
	/**
	 * Resolve the variables and references to other elements generating new properties
	 * @param container
	 */
	
	public void resolve(RIIFElement container);
	
	/**
	 * Clear the properties generated by the resolve method
	 * @param container
	 */
	public void clear(RIIFElement container);
	
	/**
	 * Returns the number of children elements in this one
	 */
	public int getChildCount();
	
	/**
	 * Return the element corresponding to that name
	 * @param name
	 */
	public RIIFElement getElement(String name);
	
	/**
	 * Return the names of the children elements
	 * @param name
	 */
	public Set<String> getElementNames();
}
